package com.kede.api.stand.controller.zhi;

import com.kede.pojo.PagePO;
import com.kede.pojo.ResHttp;
import com.kede.service.UnishopProductService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 门店置换管理
 * @Author:Pr.li
 * @Date: create in 2023/6/17 14:00
 */
@RestController
@RequestMapping("zhi/store")
public class ZhiStoreIndex {

    @Resource
    private UnishopProductService unishopProductService;


    /**
     * 得到置换物品分类
     *
     * @return {@link ResHttp}
     */
    @GetMapping("getMyGoodNum")
    public ResHttp getZhiCateGood(Integer storeUserId){
        return ResHttp.okData(unishopProductService.getMyGoodNum(storeUserId));
    }


    /**
     * 我的物品
     *
     * @param storeUserId 门店userid
     * @return {@link ResHttp}
     */
    @GetMapping("getMyGoods")
    public ResHttp getMyGoods(PagePO pagePO, Integer storeUserId, String cateName, String keyword){
        return unishopProductService.getMyGoods(pagePO,storeUserId,cateName,keyword);
    }

}
